package
{
	import cache.AvatarCache;
	
	import common.resource.loaders.AnimatorLoader;
	
	import flash.display.Sprite;
	import flash.display.Stage;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import module.avatar.Avatar;
	
	import utils.Vector2D;
	
	[SWF(frameRate="60", width="1028", height="960", backgroundColor=0xCCCCCC)]
	public class CopySword extends Sprite
	{
		public static var stageA:Stage;
		private var _avatar:Avatar;
		public function CopySword()
		{
			stageA = stage;
			stage.align = StageAlign.TOP_LEFT;
			stage.scaleMode = StageScaleMode.NO_SCALE;
			
			_avatar = new Avatar();
			_avatar.x  = 200;
			_avatar.y  = 200;
			addChild(_avatar);
			stage.addEventListener(MouseEvent.CLICK, onClick);
			_avatar.walk();
		}
		
		private function onClick(e:MouseEvent):void
		{
			_avatar.direction ++;
			if(_avatar.direction > 7)
			{
				_avatar.direction = 0;
			}
		}
		//
	}
}